import { PropType } from "vue";
import {
  ScrollPosition,
  TabsPosition,
  TabsType,
  TabTriggerEvent,
} from "./interface";
import { Direction, Size } from "@/ArcoUni/utils/interface";

export const props = {
  /**
   * @zh 当前选中的标签的 `key`
   * @en The `key` of the currently selected label
   * @vModel
   */
  activeKey: {
    type: [String, Number],
    default: undefined,
  },
  /**
   * @zh 默认选中的标签的`key`（非受控状态，为空时选中第一个标签页）
   * @en The `key` of the tab selected by default (uncontrolled state, select the first tab page when it is empty)
   */
  defaultActiveKey: {
    type: [String, Number],
    default: undefined,
  },
  /**
   * @zh 选项卡的位置
   * @en Position of the tab
   * @values 'left', 'right', 'top', 'bottom'
   */
  position: {
    type: String as PropType<TabsPosition>,
    default: "top",
  },
  /**
   * @zh 选项卡的大小
   * @en The size of the tab
   * @values 'mini', 'small', 'medium', 'large'
   */
  size: {
    type: String as PropType<Size>,
  },
  /**
   * @zh 选项卡的类型
   * @en The type of tab
   * @values 'line', 'card', 'card-gutter', 'text', 'rounded', 'capsule'
   */
  type: {
    type: String as PropType<TabsType>,
    default: "line",
  },
  /**
   * @zh 选项卡的方向
   * @en The direction of tab
   * @values 'horizontal', 'vertical'
   */
  direction: {
    type: String as PropType<Direction>,
    default: "horizontal",
  },
  /**
   * @zh 是否在不显示标签时销毁内容
   * @en Whether to destroy the content when the label is not displayed
   * @version 2.27.0
   */
  destroyOnHide: {
    type: Boolean,
    default: false,
  },
  /**
   * @zh 是否在首次展示标签时挂载内容
   * @en Whether to mount the content when the label is first displayed
   */
  lazyLoad: {
    type: Boolean,
    default: false,
  },
  /**
   * @zh 高度撑满容器，只在水平模式下生效。
   * @en The height of the container is fully supported, and it only takes effect in horizontal mode.
   */
  justify: {
    type: Boolean,
    default: false,
  },
  /**
   * @zh 是否开启选项内容过渡动画
   * @en Whether to enable option content transition animation
   */
  animation: {
    type: Boolean,
    default: false,
  },
  /**
   * @zh 选项卡头部是否存在水平边距。仅对 `type` 等于 `line`、`text` 类型的选项卡生效
   * @en Whether there is a horizontal margin on the header of the tab. Only valid for tabs with `type` equal to `line` and `text` type
   * @version 2.10.0
   */
  headerPadding: {
    type: Boolean,
    default: true,
  },
  /**
   * @zh 创建标签后是否切换到新标签（最后一个）
   * @en Whether to switch to a new tab after creating a tab (the last one)
   * @version 2.18.0
   */
  autoSwitch: {
    type: Boolean,
    default: false,
  },
  /**
   * @zh 是否隐藏内容
   * @en Whether to hide content
   * @version 2.25.0
   */
  hideContent: {
    type: Boolean,
    default: false,
  },
  /**
   * @zh 触发方式
   * @en Trigger method
   * @values 'hover','click'
   * @version 2.34.0
   */
  trigger: {
    type: String as PropType<TabTriggerEvent>,
    default: "click",
  },
  /**
   * @zh 被选中 tab 的滚动位置，默认 auto 即会将 activeTab 滚动到可见区域，但不会特意做位置调整
   * @en The scroll position of the selected tab, the default auto will scroll the activeTab to the visible area, but will not adjust the position intentionally
   * @values 'start', 'end', 'center', 'auto', number
   */
  scrollPosition: {
    type: [String, Number] as PropType<ScrollPosition>,
    default: "auto",
  },
};
